cmake_minimum_required(VERSION 3.4)
set(PROJ_NAME case14)
project(${PROJ_NAME})

add_executable(${PROJ_NAME}
    main.cpp
    )

add_custom_command(TARGET ${PROJ_NAME} POST_BUILD
    # COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/default.ini" "${CMAKE_CURRENT_BINARY_DIR}/default.ini"
    COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data" "${CMAKE_CURRENT_BINARY_DIR}/data"
    COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/result"
    COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${PROJ_NAME}>" "${CMAKE_CURRENT_BINARY_DIR}/result/$<TARGET_FILE_NAME:${PROJ_NAME}>"
    COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_PDB_FILE:${PROJ_NAME}>" "${CMAKE_CURRENT_BINARY_DIR}/result/$<TARGET_PDB_FILE_NAME:${PROJ_NAME}>"
    )
